package smetana.modules.io.dbfimpot;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author dmitry.mamonov
 */
public class ExternalDocument {
    String provn; // id,
    Date datedoc; //date_actual
    String code_a; //agent_id
    String remark; //description,
    String object; //contract_note,
    String adress; //address,
    String nomer_hand; //user_code,
    String codeb; // manager_id

    public String getPrimary() {
        return getProvn();
    }


    public String getAdress() {
        return adress;
    }

    public void setAdress(String adress) {
        this.adress = adress;
    }

    public String getCode_a() {
        return code_a;
    }

    public void setCode_a(String code_a) {
        this.code_a = code_a;
    }

    public String getCodeb() {
        if (codeb.isEmpty()==true){
            return "";
        } else {
            return String.valueOf(new BigDecimal(codeb).intValue());
        }
    }

    public void setCodeb(String codeb) {
        this.codeb = codeb;
    }

    public Date getDatedoc() {
        return datedoc;
    }

    public void setDatedoc(Date datedoc) {
        this.datedoc = datedoc;
    }

    public String getNomer_hand() {
        return nomer_hand;
    }

    public void setNomer_hand(String nomer_hand) {
        this.nomer_hand = nomer_hand;
    }

    public String getObject() {
        return object;
    }

    public void setObject(String object) {
        this.object = object;
    }

    public String getProvn() {
        return provn;
    }

    public void setProvn(String provn) {
        this.provn = provn;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return "ExternalDocument{" +
                "adress='" + adress + '\'' +
                ", provn='" + provn + '\'' +
                ", datedoc='" + datedoc + '\'' +
                ", code_a='" + code_a + '\'' +
                ", remark='" + remark + '\'' +
                ", object='" + object + '\'' +
                ", nomer_hand='" + nomer_hand + '\'' +
                ", codeb='" + codeb + '\'' +
                '}';
    }

}
